<template>
    <div class="DeliveryPerson">
        <TableTitle>
            <slot>
                <p>查询条件</p>
            </slot>
        </TableTitle>
        <ConditionSearch style="padding: 5px 0">
        <slot>
            <div class="tableSearch">
            <ul>
                <li>
                    <el-input
                        ref="saomaInput"
                        size="mini"
                        v-model="deliveryEmpCode"
                        placeholder="请输入内容"
                    ></el-input>
                    <span>配送人编号：</span>
                </li>
                <li>
                    <el-input
                    size="mini"
                    v-model="deliveryEmpName"
                    placeholder="请输入内容"
                    ></el-input>
                    <span>配送人：</span>
                </li>
            </ul>
            <div class="searchBtnBox">
                <el-button size="mini" type="primary" @click="searchBtn"
                    >查询</el-button
                >
            </div>
            </div>
        </slot>
        </ConditionSearch>
        <TableTitle>
        <slot>
            <p>操作按钮</p>
        </slot>
        </TableTitle>
        <TopBtn></TopBtn>
        <TableTitle>
        <slot>
            <p>配送小车信息表</p>
        </slot>
        </TableTitle>
        <Table></Table>
    </div>
</template>
<script>
import TopBtn from "./components/TopBtn.vue";
import Table from "./components/InfoTable.vue";
import ConditionSearch from "../aacomponents/ConditionSearch.vue";
import TableTitle from "../../../../components/TableTitle.vue";
import { sysDpTableData } from "@/utils/api.js";
export default {
    name:'DeliveryPerson',
    components:{
        TableTitle,
        ConditionSearch,
        Table,
        TopBtn
    },
    data(){
        return{
            deliveryEmpCode:'',
            deliveryEmpName:'',
            pageSize:100,
            pageNumber:1,
            
        }
    },
    methods:{
        searchBtn(){
            // 将查询信息传给Table
            this.$bus.$emit("sysDpSearchWord", {deliveryEmpCode:this.deliveryEmpCode,deliveryEmpName:this.deliveryEmpName});
            // sysDpTableData({
            //     searchParams: {
            //     deliveryEmpCode: this.deliveryEmpCode,
            //     deliveryEmpName: this.deliveryEmpName,
            //     },
            //     pageParameter: {
            //     rows: this.pageSize,
            //     page: this.pageNumber,
            //     },
            // }).then((res) => {
            //     console.log("配送员表格", res);
            //     if (res.data.retCode == 200) {
            //         this.$Alert({
            //             title: "成功",
            //             message: res.data.message,
            //             type: "success",
            //         });
                    
            //     } else {
            //         this.$bus.$emit("sysDpSearchWord", {deliveryEmpCode:this.deliveryEmpCode,deliveryEmpName:this.deliveryEmpName});
            //         this.$Alert({
            //         title: "失败",
            //         message: res.data.message,
            //         type: "error",
            //         });
            //     }
            // });
        }
    },
    mounted(){
        
    }
}
</script>
<style scoped>
.tableSearch {
  position: relative;
}
.tableSearch ul li {
  float: left;
  width: 21%;
  height: 30px;
  line-height: 30px;
  margin-right: 1%;
  margin-bottom: 5px;
  overflow: hidden;
}
.tableSearch ul li span {
  float: right;
}
.tableSearch ul li div {
  float: right;
}
.el-input {
    width: 130px;
}
.searchBtnBox {
  position: absolute;
  top: 0;
  right: 50px;
}
</style>